#include "types/hash.h"
#include "types/buffer_info.h"

void print(BufferKey k, BufferInfo b)
{
	printf("\n%s",k.tablename.c_str());
	printf(" - %d", b.bp_index);
}

int main(int argc, char **argv)
{
	if(argc < 2)
	{
		printf("\nhash_test [test_name] [test_params]");
	}
	
	string test_name(argv[1]);
	
	if(test_name == "gen_test")
	{
		BufferInfoTbl bh;
		BufferKey k1 = {"t1",1};
		BufferKey k2 = {"t2",2};
		BufferInfo b1 = {0, false};
		BufferInfo b2 = {1, false};
		BufferInfo b3 = {2, false};
		
		bh.insert(k1, b1);
		bh.insert(k2,b2);
		bh.insert(k2,b3);
			
		bh.foreach(print);
	}
}
